Optimal. Leaf size=43 \[ \frac {(a+b) \log (1-\cos (c+d x))}{2 d}+\frac {(a-b) \log (\cos (c+d x)+1)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {3883, 2668, 633, 31} \[ \frac {(a+b) \log (1-\cos (c+d x))}{2 d}+\frac {(a-b) \log (\cos (c+d x)+1)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 633
Rule 2668
Rule 3883
Rubi steps
\begin {align*} \int \cot (c+d x) (a+b \sec (c+d x)) \, dx &=\int (b+a \cos (c+d x)) \csc (c+d x) \, dx\\ &=-\frac {a \operatorname {Subst}\left (\int \frac {b+x}{a^2-x^2} \, dx,x,a \cos (c+d x)\right )}{d}\\ &=-\frac {(a-b) \operatorname {Subst}\left (\int \frac {1}{-a-x} \, dx,x,a \cos (c+d x)\right )}{2 d}-\frac {(a+b) \operatorname {Subst}\left (\int \frac {1}{a-x} \, dx,x,a \cos (c+d x)\right )}{2 d}\\ &=\frac {(a+b) \log (1-\cos (c+d x))}{2 d}+\frac {(a-b) \log (1+\cos (c+d x))}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 60, normalized size = 1.40 \[ \frac {a (\log (\tan (c+d x))+\log (\cos (c+d x)))}{d}+\frac {b \log \left (\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}-\frac {b \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.82, size = 38, normalized size = 0.88 \[ \frac {{\left (a - b\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + {\left (a + b\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.26, size = 61, normalized size = 1.42 \[ \frac {{\left (a + b\right )} \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) - 2 \, a \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.46, size = 35, normalized size = 0.81 \[ \frac {a \ln \left (\sin \left (d x +c \right )\right )}{d}+\frac {b \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.52, size = 34, normalized size = 0.79 \[ \frac {{\left (a - b\right )} \log \left (\cos \left (d x + c\right ) + 1\right ) + {\left (a + b\right )} \log \left (\cos \left (d x + c\right ) - 1\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.31, size = 51, normalized size = 1.19 \[ \frac {a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {a\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}+\frac {b\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec {\left (c + d x \right )}\right ) \cot {\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________